<?php
namespace app\api\model;
use think\Model;
use think\model\concern\SoftDelete;
class CommentUser extends Model
{
    use SoftDelete;
    protected $name = "comment_user";
    protected $pk = "id";
    protected $deleteTime = "delete_time";
    protected $defaultSoftDelete = 0;
    protected $json = [];
    protected $jsonAssoc = true;
    public function getImgsAttr($value){
        if($value){
            $value = getAppFilePath($value,true);
        }else{
            $value = [];
        }
        return $value;
    }
    public function getuser(){
        return $this->hasOne(Users::class,'id','uid');
    }
}